<template>
  <svg aria-hidden="true">
    <use
      :fill="props.color"
      :href="symbolId"
    />
  </svg>
</template>

<script setup>
const props = defineProps({
  prefix: {
    type: String,
    default: 'icon',
  },
  name: {
    type: String,
    required: true,
  },
  color: {
    type: String,
    default: '#333',
  },
})

const symbolId = computed(() => `#${props.prefix}-${props.name}`)
</script>
<style scoped>
svg {
  width: 32px;
  height: 32px;
}
</style>
